<?php 
function connect(){

// Create connection
    $con=mysqli_connect("localhost","root","","demo");
    
// Check connection
    if (mysqli_connect_errno()) {
        echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }

    return $con;
}
function close_connect($con){
    mysqli_close($con);
}

?>